{% extends "base.html" %}
{% block content %}
    <div class="p-3 mt-4">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-md-5">
                    <div class="card shadow p-3 mb-4 rounded">
                        <div class="card-body">
                            <h2>Login</h2>
                            <hr />
                            {% if template_data.clear %}
                            <div class="alert alert-danger" role="alert">
                                {{ template_data.error }}
                            </div>
                            {% endif %}
                            <form method="post">
                                {% csrf_token %}
                                <p>
                                    <label for="username">用户名：</label>
                                    <input name="username" type="text" required autocomplete="username" class="form-control"/>
                                </p>
                                <p>
                                    <label for="password">密码：</label>
                                    <input name="password" type="password" required autocomplete="current-password" class="form-control"/>
                                </p>
                                <div class="text-center">
                                    <button type="submit" class="btn bg-dark text-white">登录</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}